package com.ysd.dao.impl;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import com.ysd.util.DBManage;

public class usersDao {
	public int update(String name,String imgUrl,String sign,String sex,String email,String phone) {
		int i=0;
		
		try {
			Connection conn = DBManage.getConn();
			Statement stam = conn.createStatement();
			String sql="UPDATE yonghu SET imgUrl='"+imgUrl+"', sign='"+sign+"', sex='"+sex+"', email='"+email+"', phone='"+phone+"' where name='"+name+"'";
			i=stam.executeUpdate(sql);
			DBManage.colseAll(null, stam, conn);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return i;
		
	}
}
